﻿<UserControl x:Class="Road3App.Views.UserControls.RoadVehicleUC"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:s="clr-namespace:Road3App.Services.Converters"
             VerticalAlignment="Top" HorizontalAlignment="Left">
    
    <UserControl.Margin>
        <MultiBinding Converter="{StaticResource DLMConv}">
            <Binding Path="Distance"/>
            <Binding Path="Length"/>
            <Binding Path="Lane"/>
        </MultiBinding>
    </UserControl.Margin>
    
    <Grid>
        <Rectangle Width="{Binding Length}"
                   Height="10"
                   Fill="{Binding Color, Converter={StaticResource ColorConv}}" />
        <TextBlock Text="{Binding CurrentSpeed}" VerticalAlignment="Center" Visibility="Collapsed"/>
    </Grid>
</UserControl>
